package com.twu.biblioteca.command;

import com.twu.biblioteca.LibraryController;
import com.twu.biblioteca.model.Book;
import com.twu.biblioteca.model.Movie;
import com.twu.biblioteca.model.User;

public class ShowUserInformationCommand implements Command{

    private LibraryController libraryController;

    public ShowUserInformationCommand(LibraryController libraryController) {
        this.libraryController = libraryController;
    }

    @Override
    public void execute() {
        User user = libraryController.getLoggedUser();

        StringBuilder sb = new StringBuilder();
        sb.append("My Personal Information: \n");
        sb.append(" Name: ").append(user.getName());
        sb.append(" Email: ").append(user.getEmail());
        sb.append(" Phone number:").append(user.getPhoneNumber());
        sb.append("\n");
        System.out.println(sb.toString());

    }
}
